package com.prd.controller;


import com.prd.dto.OaAppointmentOrganizeDTO;
import com.prd.service.OaAppointmentOrganizeService;
import com.prd.util.JsonData;
import com.prd.vo.OaAppointmentRequestVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 组织任命数据表 前端控制器
 * </p>
 *
 * @author lizhaoyi
 * @since 2024-01-21
 */
@RestController
@RequestMapping("/api/oaAppointmentOrganize")
@Api(tags = "职务变动")
public class OaAppointmentOrganizeController {

    @Autowired
    private OaAppointmentOrganizeService organizeService;

    @ApiOperation("职务变动列表")
    @GetMapping
    public JsonData getList(){

        return organizeService.getList();
    }

    @ApiOperation("职务变动分页列表")
    @GetMapping("page")
    public JsonData getPage(OaAppointmentRequestVo requestVo){

        return organizeService.getPage(requestVo);
    }


    @ApiOperation("组织考察任命-提交审核")
    @PostMapping("submit")
    public JsonData submit(@RequestBody OaAppointmentOrganizeDTO organizeDTO){

        return organizeService.submit(organizeDTO);
    }

    @ApiOperation("任命详情")
    @GetMapping("/{id}")
    public JsonData detail(@PathVariable("id") Long id){

        return null;
    }

}

